package com.kim.androidbase.db;

import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.util.List;

public class DAOImpl<T, PK> implements DAO<T, PK> {

	Class<?> clazzT;
	Class<?> clazzPK;

	public DAOImpl() {
		Type type = getClass().getGenericSuperclass();
		if (type != null) {
			ParameterizedType parameterizedType = (ParameterizedType) type;
			Type[] types = parameterizedType.getActualTypeArguments();
			if (types != null && types.length == GENERICITY) {
				clazzT = (Class<?>) types[0];
				clazzPK = (Class<?>) types[1];
			}
		}
	}

	@Override
	public void add(T t) {

	}

	@Override
	public void add(List<T> ts) {

	}

	@Override
	public void delete(PK pk) {

	}

	@Override
	public void delete(SQLiteCriteria sqLiteCriteria) {

	}

	@Override
	public void modify(SQLiteCriteria sqLiteCriteria) {

	}

	@Override
	public void modify(PK pk, SQLiteCriteria sqLiteCriteria) {

	}

	@Override
	public T query(PK pk) {
		return null;
	}

	@Override
	public List<T> query(SQLiteCriteria sqLiteCriteria) {
		return null;
	}

}
